package org.jeecg.modules.prodentry.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.prodentry.entity.ProdEntry;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * @Description:  成品仓出入库
 * @Author: jerryzhu
 * @Date:   2021-11-15
 * @Version: V1.0
 */
public interface ProdEntryMapper extends BaseMapper<ProdEntry> {
	
	/**查询金出入库数据明细分页*/
	IPage<ProdEntry> selectProdEntryPage(Page<ProdEntry> page, @Param(Constants.WRAPPER) Wrapper<ProdEntry> queryWrapper);

	/**查询仓库库存数据列表，不分页*/
	List<ProdEntry> getProdEntryStorageSummaryList(@Param("storageId") String storageId);
	
	/**查询员工库存数据列表，不分页*/
	List<ProdEntry> getProdEntryPersonSummaryList(@Param("userName") String userName);

	/**根据ID获取仓库名字*/
	@Select("select name from prod_storage where id = #{id}")
	String getStorageName(@Param("id") String id);
}
